package org.celery.modules.ticket.service;

import org.celery.modules.ticket.dto.TicketDTO;
import org.celery.modules.ticket.entity.SearchEntity;
import org.celery.modules.ticket.entity.Ticket;
import org.celery.modules.ticket.vo.TicketVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * 订单表 服务类
 *
 * @author Celery
 * @since 2023-06-12
 */
public interface ITicketService extends BaseService<Ticket> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param ticket
	 * @return
	 */
	IPage<TicketVO> selectTicketPage(IPage<TicketVO> page, TicketVO ticket);

	IPage<Ticket> getOrderList(Ticket order, Query query);

	Boolean deleteOrder(Long orderId);

	Boolean modifyOrder(Ticket order);

	Boolean addOrder(Ticket order);

	Boolean addOrderInput(List<TicketDTO> orders) throws ParseException;

	Ticket getOrderById(Long orderId);

	Boolean batchDeleteOrder(String orderIds);

	Boolean batchModifyOrder(List<Ticket> orders);

	Boolean batchAddOrder(List<Ticket> orders);

	IPage<Ticket> getOrderLikeId(Ticket order, Query query);

	/**
	 * 根据相关value查找支付状态
	 */
	IPage<Ticket> getPayStatusByLike(Integer payStatusValue, Query query);

	/**
	 * 根据相关的value查找交易状态
	 */
	IPage<Ticket> getTransactionStatus(String transactionStatus, Query query);

	/**
	 * 根据相关的value查找退款状态
	 */
	IPage<Ticket> getRefundStatus(String refundStatus, Query query);

	/**
	 * 条件搜索
	 */
	IPage<Ticket> getTicketByCondition(SearchEntity searchEntity, Query query, BladeUser user);

	/**
	 * 店铺分类的接口
	 */
	List<HashMap<String, String>> getShopSelectData();

	/**
	 * 通过已经付款的订单去获取对应的物流信息
	 */
	Object getTradeGetLogisticsInfosSellerViewList(Long orderId, String webSite);

	/**
	 * 返回订单信息相关的接口
	 */
	ArrayList<HashMap<String, String>> getTicketListForBuyerInfo(Long orderId);

	/**
	 * 获取订单的物流信息
	 */
	Object getLogisticsInfosSellerView(Long orderId, String website);

	/**
	 * 返回发货的跳转地址
	 */
	String getSendGoodUrl(Long orderId);

	Boolean changeTicketStatus(Long orderId);
}
